package com.kafka.xiang;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import javax.swing.*;
@SpringBootApplication
@ComponentScan("com.kafka.xiang.controller")
@ComponentScan("com.kafka.xiang.config")

public class DemoApplication {

    public static void main(String[] args) {

        SwingUtilities.invokeLater(() -> {
            Swing swingApp = new Swing();
            swingApp.setVisible(true);
        });


        SpringApplication springApplication = new SpringApplication(DemoApplication.class);
        springApplication.setHeadless(false);//关闭springboot的无头模式，确保awt的robot可以创建、
        springApplication.run(args);
    }
}